package com.gobrs.async.core.anno;

import com.gobrs.async.core.common.def.DefaultConfig;
import org.springframework.stereotype.Component;

import java.lang.annotation.*;

@Target({ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Component
public @interface Task {

    String value() default "";

    String desc() default DefaultConfig.TASKNAME;

    boolean callback() default false;

    /**
     * 任务失败后是否继续执行子任务
     */
    boolean failSubExec() default false;

    /**
     * 重试次数
     */
    int retryCount() default DefaultConfig.retryCount;

}
